package com.ruicar.afs.cloud.common.modules.afscorebusiness.enums;

import com.ruicar.afs.cloud.common.core.enums.AfsBaseEnum;
import lombok.Getter;

/**
 * @author yk.Li
 * @description
 * @date 2020/5/31 2:49 下午
 */
@Getter
public enum ActivateStatusEnum implements AfsBaseEnum {
    ACTIVATE("activate", "已激活"),
    UN_ACTIVATE("unActivate", "待激活"),
    DISCARD("discard", "已废弃");

    public String status;
    public String desc;

    ActivateStatusEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static String getDescByStatus(String status) {
        for (ActivateStatusEnum info : values()) {
            if (status.equals(info.getStatus())) {
                return info.getDesc();
            }
        }
        return null;
    }
}
